/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thinkinginjava.svn.strings.regularexpressions;

import java.util.Scanner;

/**
 *
 * @author public_enemy
 */
public class ScannerDelimiter {

    public static void main(String[] args) {
        Scanner input = new Scanner("12, 42, 78, 99, 42");
        input.useDelimiter("\\s*,\\s*");
        while (input.hasNextInt()) {
            System.out.println(input.nextInt());
        }
    }
}
